package com.mmp.main.util;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.mmp.common.logging.LOGGER_TYPE;
import com.mmp.common.util.Common;
import com.mmp.common.util.PropertiesUtil;

public class Default {

	public final static String APP_SERVER_IP = PropertiesUtil.getSystemProperty("appServerIP");
	public final static String APP_CONTEXT = PropertiesUtil.getSystemProperty("appContext");
	public final static String FILES_UPLOAD_DIR = PropertiesUtil.getSystemProperty("uploadDir");//"D:\\uploads\\";
	
	public final static String DIRECTORATE_NAME = PropertiesUtil.getSystemProperty("directorateName");
	
	public final static String MULTIVALUE_SEPARATOR = "$";
	public final static String FILE_NAME_SEPARATOR = "_sfn_"; // sfn : start of
																// original file
																// name

	public final static String SEARCH_DEST_PARAM_NAME = "dest";
	
	public final static String JOBORDER_PHASE_ATTR_NAME = "phaseId";
	
	public final static String SAVE_THEN_RETURN_BTN_NAME = "saveThenReturn";
	public final static String SAVE_THEN_CONTINUE_BTN_NAME = "saveThenContinue";
	public final static String SAVE_THEN_GO_BACK_BTN_NAME = "saveThenGoBack";
	
	/*
	 * public final static String SEARCH_DEST_UPDATE_DEVICE_PARAM_VALUE =
	 * "update_device"; public final static String
	 * SEARCH_DEST_SCRAPP_DEVICE_PARAM_VALUE = "scrapp_device"; public final
	 * static String SEARCH_DEST_CANCEL_JOB_OREDR_PARAM_VALUE =
	 * "cancel_joborder"; public final static String
	 * SEARCH_DEST_FOLLOWUP_JOB_OREDR_PARAM_VALUE = "followup_joborder"; public
	 * final static String SEARCH_DEST_PPM_VISIT_PARAM_VALUE =
	 * "ppm_visit_update"; public final static String
	 * SEARCH_DEST_OPEN_JOB_OREDR_PARAM_VALUE = "open_joborder"; public final
	 * static String SEARCH_DEST_UPDATE_SP_CATEGORY_PARAM_VALUE =
	 * "update_spcategory";
	 */
	public final static String REPORT_TITLE_PARAM_NAME = "repoTitle";

	public final static String GENERAL_ERROR_MESSAGE = "عفوا .. لقد حدث خطأ غير متوقع بالنظام  ، من فضلك أعد المحاولة مرة أخرى";

	public final static String REPORT_FILTER_SCREEN_TITLE = "شاشة إعدادات التقرير";

	public final static int RESPONSE_OUTPUT_STREAM_BUFFER_SIZE = 8 * 1024;

	public final static String DEVICE_INFO_ATTR_NAME = "deviceInfoObj";
	public final static String JOB_ORDER_INFO_ATTR_NAME = "jobOrderInfoObj";
	public final static String SP_CATEGORY_INFO_ATTR_NAME = "spCategoryObj";

	public final static String REPORT_TITLE_PREFIX = "المطلوب :";

	public final static int MAX_ALLOWED_ATTACHMENT_SIZE_IN_MB = 5; // in MB

	public final static int MAX_ALLOWED_ATTACHMENTS_NO = 5;

	public final static LOGGER_TYPE lOG_LEVEL = LOGGER_TYPE.FULLY_FEATURED;

	/*
	 * public final static String JOBORDER_NOTIFICATIONS_SETTING_ATTR_NAME =
	 * "jo_notifications_setting"; public final static String
	 * SPINVENTORY_NOTIFICATIONS_SETTING_ATTR_NAME = "sp_notifications_setting";
	 * public final static String JOBORDER_NOTIFICATIONS_TYPE_ID = "1"; public
	 * final static String SPINVENTORY_NOTIFICATIONS_TYPE_ID = "2";
	 */

	public static void main(String[] args) {
//		String str = "$7$1$";
//		for (String s : str.split("\\$"))
//			System.out.println("ss:" + s);
		//int yy = Calendar.getInstance().get(Calendar.YEAR) % 100;
		//int mm = Calendar.getInstance().get(Calendar.MONTH) + 1;
		Date now = new Date();
		String yy = new SimpleDateFormat("yy").format(now);
		String mm = new SimpleDateFormat("MM").format(now);
		Common.log(""+ (Integer.parseInt(yy+mm)*1000 + 1));

	}

}
